﻿using System;
using System.Collections.Generic;
using DevExpress.Xpo;
using System.Text;

namespace BusinessObjects
{
    public class TinhThanh : XPObject
    {
        public TinhThanh()
            : base()
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        public TinhThanh(Session session)
            : base(session)
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        public override void AfterConstruction()
        {
            base.AfterConstruction();
            // Place here your initialization code.
        }

        //Fields
        string fTenTinhThanh;
        [Size(500)]
        public string TenTinhThanh
        {
            get { return fTenTinhThanh; }
            set { SetPropertyValue<string>("TenTinhThanh", ref fTenTinhThanh, value); }
        }
        [Association(@"QuanHuyenReferencesTinhThanh", typeof(QuanHuyen))]
        public XPCollection<QuanHuyen> QuanHuyens { get { return GetCollection<QuanHuyen>("QuanHuyens"); } }
        [Association(@"DiaChiReferencesTinhThanh", typeof(DiaChi))]
        public XPCollection<DiaChi> DiaChis { get { return GetCollection<DiaChi>("DiaChis"); } }
    }
}
